import request from '@/utils/request'
//检测手机号是否被占用
export const occupiedPhone=async (phone:any)=>{
    return request({
        url:'/api/users/'+phone
    })
}
//获取验证码
export const getCodeData=async (phone:any)=>{
    return request({
        url:'/api/users/'+phone+'/code'
    })
}
//校验验证码
export const checkCode=async(phone:any,code:any)=>{
    return request({
        url:'/api/users/'+phone+'/verifycode',
        params:{
            code,
        }
    })
}
//用户注册
export const userRegister=async(phone:any,password:any)=>{
    return request({
        method:'POST',
        url:'/api/users/register',
        data:{
            phone,
            password

        }

    })
}